xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"

xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
  xml.channel do
    xml.title @page_title
    xml.link(url_for(:action => "index", :only_path => false))
    xml.language "en-us"
    xml.ttl "40"
    xml.description "Campina Virtual: Producos de andalucia"

    for producto in @productos
      xml.item do
        xml.title(producto.nombre)
        xml.description("#{producto.nombre} by #{producto.productor}")
        xml.pubDate(producto.created_at.to_s(:long))
        xml.guid(url_for(:action => "show", :id => producto, :only_path => false))
        xml.link(url_for(:action => "show", :id => producto, :only_path => false))
      end
    end
  end
end